﻿<div id="_register" style="display: none; position: fixed; left: 35%; top: 20%; width: 30%; background-color: #c8efc8; border: 10px solid #b9b9b9; ">
    <div class="container-fluid" style="text-align: right; padding-top: 10px; ">
        <a onclick="closeAll()" style="cursor: pointer; "><img src="~/PicRes/close.png" /></a>
    </div>
    <div class="container-fluid" style="padding-top: 40px; padding-bottom: 50px;">
        @using (Ajax.BeginForm("Register", "Home", null, new AjaxOptions
        {
            HttpMethod = "Post",
            UpdateTargetId = "wrongRegister",
            InsertionMode = InsertionMode.Replace,
            OnSuccess = "reloadRegister()"
        }, new { @class = "form-horizontal" }))
        {
            <div class="col-sm-offset-1" id="wrongRegister" style="padding-left: 3px; margin-bottom: 5px; color: red; font-family: 微软雅黑; font-size: 15px; "></div>
            <form class="form-horizontal" role="form">
                <div class="form-group">
                    <div class="col-sm-offset-1 col-sm-10">
                        <input type="text" id="reg-email" name="reg-email" class="form-control" placeholder="请输入登陆邮箱" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-1 col-sm-10">
                        <input type="password" id="reg-key" name="reg-key" class="form-control" placeholder="请输入密码" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-1 col-sm-10">
                        <input type="password" id="reg-confirm-email" name="reg-confirm-email" class="form-control" placeholder="请再次输入密码" />
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-1 col-sm-10">
                        <input type="text" id="reg-name" name="reg-name" class="form-control" placeholder="请输入称谓(教师建议用真实姓名)" />
                    </div>
                </div>
                <div class="form-group">
                    <p class="col-sm-offset-1 col-sm-4">用户类型：</p>
                    <label class="radio-inline col-sm-3" style="padding-top: 0px;">
                        <input type="radio" name="userType" id="radio1" value="学生"> 学生
                    </label>
                    <label class="radio-inline col-sm-3" style="padding-top: 0px;">
                        <input type="radio" name="userType" id="radio2" value="教师"> 教师
                    </label>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-1 col-sm-4">
                        <button type="submit" class="button button-flat-highlight">注 册</button>
                    </div>
                    <div class="col-sm-offset-2 col-sm-4">
                        <a class="button button-flat-primary" style="margin-left: 9px; cursor: pointer;" onclick="onlyShowLogin()">登 陆</a>
                    </div>
                </div>
            </form>
        }
    </div>
</div>
<script type="text/javascript">
    function reloadRegister() {
        if ($("#wrongRegister").html() == "")
            window.location.reload();
    }
</script>